<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.cap.bts.framework.usermgnt.constant.EmployeeStatus"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>短信推送设定</title>
<%@include file="../include/include.jsp"%>
<link rel="stylesheet" type="text/css" href="${csspath }/public.css" />
<script type="text/javascript" src="${jspath}/jquery/jquery-2.1.3.js"></script>
<link rel="stylesheet" type="text/css"
	href="${bootstrapPath}/css/bootstrap.css" />
<script type="text/javascript" src="${bootstrapPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${layerPath }/layer.js"></script>
</head>

<script type="text/javascript">
function returnRemind(){
	var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
		parent.layer.close(index); //再执行关闭  
}

function confirmMsgPackage(){
	$.ajax({
		url:'${webcontext}/crmdp/dealer/remind/saveMsgPackage',
		type:'post',
		data:$('#form').serialize(),
			success : function(data) {
				if(!data.result){
					jAlert(data.errorMsg);
				}else{
					jAlert("操作成功！","提示",function(){
  					/* //当你在iframe页面关闭自身时
  					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  					parent.layer.close(index); //再执行关闭   */
  					parent.location.href="${webcontext}/crmdp/dealer/remind/toRemindSetting";
					});
				}
        },
        error: function (msg) {
            alert(msg);
        }
	})
}
</script>
<style type="text/css">
.checkbox-li {
	display: inline-block;
	width: 100px;
}
</style>
<body>
	<div id="content" style="margin-left:50px">
		<form id="form" class="" action="#" method="post">
		<input type="hidden" name="id" value="${codeInfo.id}"> 
			<div class="form-group" >
				<label for="value">短信包名称</label> <input
					id="value" name="value"
					class="form-control input-sm" style="width: 200px;"
					value="${codeInfo.value}">
			</div>
			<div class="form-group">
				<label for="code">条数</label> <input id="remindDays"
					name="code" class="form-control input-sm"
					style="width: 200px;" value="${codeInfo.code}">
			</div>
			 <div style="margin-left:50px">
				    <button type="button" class="btn btn-success" onClick="confirmMsgPackage()">&nbsp;确定&nbsp;</button> &nbsp;&nbsp;&nbsp;&nbsp;
				   	<button type="button" class="btn btn-success" value="返回 " onclick="returnRemind()">&nbsp;返回&nbsp;</button>
				   	<div id='high10'>
				   	</div>
				   </div>		
				   </form>
	</div>
</body>
</html>